﻿using System;
using System.Collections.Generic;
using System.Web;

namespace MikeKappel.Com.CS
{
    public static partial class Globalization
    {
        /// <summary>
        /// IDN (Internationalized Domain Name)
        /// This method Translates Unicode (multi-language characters) to ASCII (American Standard Code for Information Interchange)
        /// Web Service Available at http://MichaelKappel.com/wsIDN.asmx
        /// <example>Input "帝.com" result "xn--ztt.com"< /example>
        /// </summary>
        /// <param name="domain">International Domain Name</param>
        /// <returns>English Domain Name</returns>
        public static String IdnInternationalizedToEnglish(String domain)
        {
            return (new System.Globalization.IdnMapping()).GetAscii(domain);
        }
    }
}